/*
 * @Description: 数据预处理节点入口
 * @Author: Sang Hao
 * @Date: 2021-10-26 15:30:07
 * @LastEditTime: 2021-10-27 13:48:18
 * @LastEditors: Sang Hao
 */

#include <ros/ros.h>
#include "glog/logging.h"

#include "lidar_slam/global_defination/global_defination.h"
#include "lidar_slam/data_pretreat/data_pretreat_flow.hpp"

using namespace lidar_slam;

int main(int argc, char* argv[]) {
	google::InitGoogleLogging(argv[0]);
	FLAGS_log_dir = WORK_SPACE_PATH + "/Log";
	FLAGS_alsologtostderr = 1;

	ros::init(argc, argv, "data_pretreat_node");
	ros::NodeHandle nh;

	std::shared_ptr<DataPretreatFlow> data_pretreat_flow_ptr = 
		std::make_shared<DataPretreatFlow>(nh);
	
	ros::Rate rate(100);
	while (ros::ok()) {
		ros::spinOnce();

		data_pretreat_flow_ptr->Run();

		rate.sleep();
	}
	return 0;

}